home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.accessibility;
-
- import java.util.Locale;
- import java.util.MissingResourceException;
- import java.util.ResourceBundle;
-
- public abstract class AccessibleBundle {
- protected String key = null;
-
- public String toDisplayString() {
- return this.toDisplayString(Locale.getDefault());
- }
-
- protected String toDisplayString(String resourceBundleName, Locale locale) {
- String displayString = null;
-
- try {
- ResourceBundle resources = ResourceBundle.getBundle(resourceBundleName, locale);
- displayString = resources.getString(this.key);
- } catch (MissingResourceException var6) {
- System.err.println(var6 + ": " + resourceBundleName + " not found");
- }
-
- return displayString != null ? displayString : this.key;
- }
-
- public String toDisplayString(Locale locale) {
- return this.toDisplayString("com.sun.java.accessibility.AccessibleResourceBundle", locale);
- }
-
- public String toString() {
- return this.toDisplayString();
- }
- }
-